<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">

    <title>wechat登陆</title>


    <!--STYLESHEET-->
    <!--=================================================-->

    <!--Open Sans Font [ OPTIONAL ] -->
    <link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&amp;subset=latin" rel="stylesheet">


    <!--Bootstrap Stylesheet [ REQUIRED ]-->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">


    <!--Nifty Stylesheet [ REQUIRED ]-->
    <link href="/static/css/nifty.min.css" rel="stylesheet">


    <!--Premium Icons [ OPTIONAL ]-->
    <link href="/static/premium/icon-sets/icons/line-icons/premium-line-icons.min.css" rel="stylesheet">
    <link href="/static/premium/icon-sets/icons/solid-icons/premium-solid-icons.min.css" rel="stylesheet">


    <!--=================================================-->


    <!--Page Load Progress Bar [ OPTIONAL ]-->
    <link href="/static/css/pace.min.css" rel="stylesheet">
    <script src="/static/js/pace.min.js"></script>


        <!-- Create your own class to load custum image [ SAMPLE ]-->
    <style>
        .demo-my-bg{
            background-image : url("/static/img/balloon.jpg");
        }
    </style>


        
    <!--=================================================

    REQUIRED
    You must include this in your project.


    RECOMMENDED
    This category must be included but you may modify which plugins or components which should be included in your project.


    OPTIONAL
    Optional plugins. You may choose whether to include it in your project or not.


    Detailed information and more samples can be found in the document.

    =================================================-->
        
</head>

<!--TIPS-->
<!--You may remove all ID or Class names which contain "demo-", they are only used for demonstration. -->

<body>
    <div style="margin: 0 auto;width: 600px;height: 600px">
        <div class="cls-content-lg panel">
                    <div class="panel-body">


                             <div class="col-lg-25">

					                <!--Profile Widget-->
					                <!--===================================================-->
					                <div class="panel panel-info panel-colorful">
					                    <div class="pad-all text-center">
					                        <img alt="Profile Picture" class="img-md img-circle mar-btm" src="/static/img/profile-photos/2.png">
					                        <p class="text-lg text-semibold">King for wechat</p>

					                         <div class="btn-group btn-group-justified pad-top">
					                            <a href="#" class="btn btn-icon bord-no demo-psi-facebook icon-lg add-tooltip" data-original-title="Facebook" data-container="body"></a>
					                            <a href="#" class="btn btn-icon bord-no demo-psi-twitter icon-lg add-tooltip" data-original-title="Twitter" data-container="body"></a>
					                            <a href="#" class="btn btn-icon bord-no demo-psi-google-plus icon-lg add-tooltip" data-original-title="Google+" data-container="body"></a>
					                            <a href="#" class="btn btn-icon bord-no demo-psi-instagram icon-lg add-tooltip" data-original-title="Instagram" data-container="body"></a>
					                        </div>
					                    </div>
					                </div>
					                <!--===================================================-->

					                <!--Profile Widget-->
					                <!--===================================================-->
					                <div class="panel">
					                    <div class="panel-body text-center">
					                        <img id="img"  class="img-lg  " src="https://login.weixin.qq.com/qrcode/{{ code }}">
					                        <p class="text-lg text-semibold mar-no text-main">请手机微信扫码登陆</p>
					                        <p class="text-muted">飞翔网络 www.feixiangwl.cn</p>
					                        <div class="mar-top">
					                            <button class="btn btn-mint" onclick="redme()">软件说明</button>
					                            <a class="btn btn-mint" href="http://www.feixiangwl.cn">关于我们</a>
					                        </div>
					                    </div>
					                </div>
					                <!--===================================================-->


					            </div>



                    </div>
            </div>
    </div>
</body>
<script src="/static/js/jquery.min.js"></script>
<script>
    $(function(){
        check_login();
    });

    function check_login(){
        $.ajax({
            url:'check_login',
            type:'GET',
            dataType:'JSON',
            success:function(arg){
                console.log(arg);
                if(arg['code'] == '408'){
                  check_login();
                }
                if(arg['code'] == '201'){
                    $('#img').attr('src',arg['imgpath']);
                    console.log(arg);
                    check_login();
                }
                if(arg['code'] == '200'){
                    location.href='/user/'
                }
            }
        }
        )
    }
    function redme(){
        alert('此软件由django开发，所有功能由爬虫实现，未调任何第三方接口！,仅供学习之用，不喜勿喷！')
    }
</script>
</html>
